home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / gfx / misc / SvII-1.lha / SViewII / ARexx-Scripts / SViewNGImport.rexx < prev    next >
OS/2 REXX Batch file  |  1999-02-20  |  2KB  |  78 lines

  1. /*
  2.    $VER: SViewNGImport.rexx V1.0 (22.2.98)
  3.    © 1998 by William F. Maddock
  4.  
  5.    Modified (with Andreas' help) from:
  6.    LoadRequest.rx V6.21 (17.3.97)
  7.    © 1993-97 by Andreas R. Kleinert
  8.  
  9.    Which was written to demonstrate remote control of SViewNG through its ARexx Port.
  10.  
  11.    This script should only be run from PageStream3.x Amiga and requires OS3.x.
  12.  
  13.    The path to SViewNG in line 33 should be modified to match your system.
  14.  
  15.    The "DRAWER" argument to the RequestFile command in line 45 should be changed to
  16.    suit your needs.
  17.  
  18.    This script will load a graphic file from disk via the file requester, save it to
  19.    the clipboard, command PageStream3 to paste it to the current document, then exit.
  20.    Remember, this means a 24-bit IFF-ILBM occupying space in your CLIPS: directory
  21.    (usually located in RAM:). If this bothers you, then remove the comment brackets
  22.    from line 64 (the delete command).
  23.  
  24. */
  25.  
  26. OPTIONS RESULTS
  27. SIGNAL ON ERROR
  28. SVNGPORT = 'SViewNG.rx'
  29. SVPORT   = 'SuperView.rx'
  30.  
  31. IF ~SHOW('P',SVPORT) THEN SVPORT = SVNGPORT
  32. IF ~SHOW('P',SVPORT) THEN DO
  33.    address command
  34.    "Work:GFXProcessing/SuperView/SViewNG" "-INSTALL_APPMENU=FALSE -INSTALL_APPICON=FALSE"
  35.    wait 20
  36.    IF ~SHOW('P',SVPORT) THEN SVPORT = SVNGPORT
  37.    IF ~SHOW('P',SVPORT) THEN DO
  38.      say "Could not locate ARexx port of SViewNG !"
  39.      CALL ErrorOut 0
  40.    END
  41. END
  42.  
  43. ADDRESS VALUE SVPORT
  44.  
  45.  
  46. Address Command "RequestFile DRAWER Graphics: NOICONS PUBSCREEN PageStream3 >T:RF"
  47.  
  48. OPEN('import','T:RF','read')
  49. importpath = READLN('import')
  50. CLOSE('import')
  51. importpath = STRIP(importpath,'B','"')
  52.  
  53. 'OPTION_SAVE=CLIP'
  54.  
  55. 'LOAD='importpath
  56.  
  57. 'SAVE=CLIPS:0'
  58.  
  59. ADDRESS 'PAGESTREAM'
  60.  
  61. 'pasteobject progress'
  62.  
  63. wait 5
  64.  
  65. address command "delete CLIPS:0"
  66.  
  67. CALL ErrorOut 0
  68.  
  69.  
  70. /* Errorout procedure ----------------------- */
  71.  
  72. ErrorOut:
  73.         PARSE ARG ExitCode
  74.  
  75.         EXIT ExitCode
  76.  
  77.   END
  78.